import { fetchApi } from './index';

// 获取模型数据API
export const getModels = async () => {
  return await fetchApi('/api/models');
};

// 获取并格式化模型数据（返回供应商列表和原始模型数据）
export const getFormattedModels = async () => {
  const rawData = await fetchApi('/api/models');
  const providers = Object.keys(rawData).map(provider => ({
    value: provider,
    label: provider
  }));
  return { providers, rawData };
};